package cn.javapulzzer.greaterpluzzer;

import java.util.*;

public class BananaBread {
	public static void main(String[] args) {
		Integer[] array = { 3, 1, 4, 1, 5, 9 };
		Arrays.sort(array, new Comparator<Integer>() {
			public int compare(Integer i1, Integer i2) {
				int val1 = i1.intValue();   
		        int val2 = i2.intValue();   
		        return (val1 < val2 ? -1 : (val1 == val2 ? 0 : 1));   

			}
		});
		System.out.println(Arrays.toString(array));
	}
}
